<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/sys_appversion/sys_Appversion.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/sys_appversion/sys_Appversion.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: 'APP可登陆版本',
                name: 'sys_appversion/sys_Appversion',
                url: "/sys_Appversion/",
                sortName: "Releasetime"
            });
            const editFormFields = ref({"version":"","Releasetime":"","state":""});
            const editFormOptions = ref([[{"title":"版本号","required":true,"field":"version","type":"text"},
                               {"title":"发布时间","required":true,"field":"Releasetime","type":"datetime"},
                               {"dataKey":"enable","data":[],"title":"是否可用","required":true,"field":"state","type":"select"}]]);
            const searchFormFields = ref({"version":"","Releasetime":""});
            const searchFormOptions = ref([[{"title":"版本号","field":"version"},{"title":"发布时间","field":"Releasetime","type":"datetime"}]]);
            const columns = ref([{field:'id',title:'ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'version',title:'版本号',type:'string',link:true,width:110,require:true,align:'left',sort:true},
                       {field:'Releasetime',title:'发布时间',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'state',title:'是否可用',type:'int',bind:{ key:'enable',data:[]},width:110,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
